home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 102 / CD-ROM 102.iso / aplic / 2sync / 2SyncSetup.exe / graphics / scripts / DefineButton2_362 / BUTTONCONDACTION on(press).as next >
Encoding:
Text File  |  2002-03-20  |  1.8 KB  |  51 lines

  1. on(press){
  2.    if(getProperty("catchall", _visible) eq "0")
  3.    {
  4.       set("_level40/sound/lib:sound","91");
  5.       call("_level40/sound/lib:play");
  6.       setProperty("catchAll", _visible, "1");
  7.       if(_name.substr("1","2") eq eval("_level0:focus"))
  8.       {
  9.          setProperty("popupmenu", _visible, "1");
  10.          setProperty("popupmenu/popTp", _visible, "1");
  11.       }
  12.    }
  13.    else if(_name.substr("1","2") eq eval("_level0:focus"))
  14.    {
  15.       set("_level0/ch_shell/call:colourObject",_target add "/buttonMain");
  16.       set("_level0/ch_shell/call:colourInstance","colour");
  17.       set("_level0/ch_shell/call:methodName","clear");
  18.       call("_level0/ch_shell/call:colourMethod");
  19.       setProperty("popupmenu", _visible, "0");
  20.       setProperty("catchAll", _visible, "0");
  21.       path = "_level15/" add eval("_level0:focus") add "/mt/codelib:";
  22.       if(eval(path add "currentview") eq "task" or eval(path add "currentview") eq "taskcard")
  23.       {
  24.          set(path add "currentview","day");
  25.          set(path add "startday","");
  26.          set(path add "startmonth","");
  27.          set(path add "startyear","");
  28.          check = "1";
  29.          call(path add "goto");
  30.       }
  31.       else
  32.       {
  33.          check = "0";
  34.       }
  35.       if(eval("_level0:" add eval("_level0:focus") add "_module") ne option and option ne "" and check ne "1")
  36.       {
  37.          set("_level40/sound/lib:sound","90");
  38.          call("_level40/sound/lib:play");
  39.          set("_level0:next",option);
  40.          tellTarget("_level0/loader")
  41.          {
  42.             gotoAndPlay("loadmodule");
  43.          }
  44.          set("_level0:" add eval("_level0:focus") add "_module",option);
  45.          set("_level0/data:" add option add "_mm_buttonpanel",eval("_level0:focus"));
  46.          set("_level0/build:modulemm",option);
  47.          call("_level0/build:build my menu");
  48.       }
  49.    }
  50. }
  51.